package com.javafive;

import java.io.File;

public class Demo1 {
    public static void main(String[] args) {
        File file = new File("D:\\");
        //判断文件是否存在
        boolean exists = file.exists();
        //判断是否是文件
        boolean file1 = file.isFile();
        boolean directory = file.isDirectory();
        String absolutePath = file.getAbsolutePath();

        String path = file.getPath();
        System.out.println(absolutePath);
    }
}
